import { S } from '../../s';
import { IPSDEFDGroupLogic } from './ipsdefdgroup-logic';
import { IPSDEFDLogic } from './ipsdefdlogic';
import { PSModelObjectImpl } from '../../psmodel-object-impl';

export class PSDEFDGroupLogicImpl
  extends PSModelObjectImpl
  implements IPSDEFDGroupLogic
{
  get groupOP(): string {
    return this.M.groupOP;
  }

  get logicCat():
    | 'PANELVISIBLE'
    | 'ITEMENABLE'
    | 'ITEMBLANK'
    | 'SCRIPTCODE_CHANGE'
    | 'SCRIPTCODE_CLICK'
    | 'SCRIPTCODE_FOCUS'
    | 'SCRIPTCODE_BLUR' {
    return this.M.logicCat;
  }

  get logicType(): string {
    return this.M.logicType;
  }

  protected psdefdlogics: IPSDEFDLogic[];
  getPSDEFDLogics(): IPSDEFDLogic[] | null {
    return (
      this.psdefdlogics ||
      (this.psdefdlogics = this.fillChildListModel(
        this.M.getPSDEFDLogics,
        S._297,
      ) as IPSDEFDLogic[])
    );
  }

  findPSDEFDLogic(objKey: any): IPSDEFDLogic | null {
    return this.getPSModel5(
      S._297,
      this.getPSDEFDLogics(),
      objKey,
    ) as IPSDEFDLogic;
  }

  get notMode(): boolean {
    return this.M.notMode;
  }
  get cls(): string {
    return 'PSDEFDGroupLogicImpl';
  }
  instanceof(cls: string): boolean {
    if (cls == S._a7) return true;
    return super.instanceof(cls);
  }
}
